package com.example.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ActivityPrizeEnum {

    INIT(2, "初始化"),

    COMPLETED(1, "已经抽取");

    private final Integer code;

    private final String message;

    public static ActivityPrizeEnum forName (String name) {
        for (ActivityPrizeEnum activityPrizeEnum : ActivityPrizeEnum.values()) {
            if (activityPrizeEnum.name().equalsIgnoreCase(name)) {
                return activityPrizeEnum;
            }
        }
        return null;
    }
}
